package com.wcx.application.service.Impl;

import com.wcx.application.domian.AdminBean;
import com.wcx.application.mapper.AdminMapper;
import com.wcx.application.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AdminServiceImpl implements AdminService {
    @Autowired
    AdminMapper adminMapper;

    @Override
    public List<AdminBean> getList() {
        return adminMapper.getList();
    }

    @Override
    public int update(AdminBean adminBean) {
        return adminMapper.update(adminBean);
    }

    @Override
    public int delete(int id) {
        return adminMapper.delete(id);
    }

    @Override
    public int updateAvatarById(String originalFilename, int id) {
        return adminMapper.updateAvatarById(originalFilename,id);
    }

    @Override
    public int create(AdminBean adminBean) {
        return adminMapper.create(adminBean);
    }

    @Override
    public List<AdminBean> searchList(AdminBean adminBean) {
        return adminMapper.searchList(adminBean);
    }

    @Override
    public int updateAvatarByUserName(String originalFilename, String username) {
        return adminMapper.updateAvatarByUserName(originalFilename,username);
    }


}
